# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1318165947.1437311
_template_filename='/home/kenshuri/c_chrysalide/trunk/portal/portal/templates/contact/contact.mako'
_template_uri='/contact/contact.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['title']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/index.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n\n')
        # SOURCE LINE 3
        __M_writer(u'\n<center>\n<div style="width: 720px; color: white;">\n\t<div style="width: 360px; float:left;" align="left">\n\t\t\n\t\t<h4>Liste des contacts</h4>\n\n\t\t<h5>Direction Artistique</h5>\n\t\t<p>\n\t\tC\xe9lia Quadri\n\t\tTel: 06 79 92 74 87\n\t\tEmail:\n\t\t</p>\n\t\t\n\t\t\n\t</div>\n\t<div style="float: right; width: 350px;">\n\t\t<h4>Le th\xe9\xe2tre</h4>\n\t\t<p>\n\t\t8 rue Delillle - 06000 Nice<br />\n\t\tT\xe9l\xe9phone : 06.79.92.74.87\n\t\t</p>\n\t</div>\n\t<div style="clear: both;"></div>\n\t<hr />\n</div>\n\n</center>\n \n<div style="color: white;" id="contact_form" align="center">\n\t<h4>Formulaire de contact:</h4>\n\t<table cellspacing="0" cellpadding="0" border="0" id="contact_form_table">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td>Email :</td>\n\t\t\t\t<td><input style="width: 100%;" type="text" id="send_message_sender" name="sender" /></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Sujet :</td>\n\t\t\t\t<td><input style="width: 100%;" type="text" id="send_message_subject" name="subject" /></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan="2">Message :</td>\t\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan="2">\n\t\t\t\t\t<textarea id="send_message_content" style="width: 100%; height: 150px;" name="content"></textarea>\n\t\t\t\t<td>\n\t\t\t</tr>\n\t\t\t<tr><td colspan="2"><button type="button" id="button_send_message">Envoyer</td></button></tr>\n\t\t</tbody>\n\t</table>\n</div>\n<br />\n<script type="text/javascript">\n$(document).ready(function() {\n\t$(\'#button_send_message\').click(function(){\n\t\t\n\t\tvar sender_b = $(\'#send_message_sender\').val();\n\t\tvar subject_b = $(\'#send_message_subject\').val();\n\t\tvar content_b = $(\'#send_message_content\').val();\n\t\t\n\t\tvar emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n\t\tif(!emailReg.test($(\'#send_message_sender\').val()) || $(\'#send_message_sender\').val() == "") {\n\t\t\talert("Votre email n\'est pas valide");\n\t\t\treturn false;\n\t\t}\n\t\tif($(\'#send_message_subject\').val() == "" || $(\'#send_message_content\').val() == ""){\n\t\t\talert("Tout les champs doivent etre remplit");\n\t\t\treturn false;\n\t\t}\n\t\tloading_popup(\'show\');\n\t\t$(\'#send_message_sender\').val("");\n\t\t$(\'#send_message_subject\').val("");\n\t\t$(\'#send_message_content\').val("");\n\t\t$(this).attr("disabled","disabled");\n\t\t$.post("/contact/send_message", { \tsender: sender_b, \n\t\t\t\t\t\t\t\t\t\t\tsubject: subject_b, \n\t\t\t\t\t\t\t\t\t\t\tcontent: content_b },\n\t\t\tfunction(data) {\n\t\t\t\tif(data == \'1\'){\n\t\t\t\t\talert("Votre message a bien ete envoye");\n\t\t\t\t\t$(\'#button_send_message\').removeAttr("disabled");\n\t\t\t\t}else{\n\t\t\t\t\talert("Votre message n\'a pas put etre envoye. Notre webmaster en sera avertit, veuillez reesayer plus tard, merci.");\n\t\t\t\t}\n\t\t\t\tloading_popup(\'hide\');\n\t\t   });\n\t});\n});\n</script>')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_title(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 3
        __M_writer(u'Compagnie-Chrysalide - Contacts')
        return ''
    finally:
        context.caller_stack._pop_frame()


